package com.situ.springboot.mapper;

import com.situ.springboot.pojo.Student;
import com.situ.springboot.pojo.StudentSearchVO;
import org.apache.ibatis.annotations.Param;

import java.util.List;

// IStudentDao
public interface StudentMapper {
    List<Student> selectAll();

    void deleteById(Integer id);

    // MyBatis默认不支持传递多个参数，如果要传递多个参数要加上@Param这个注解
    List<Student> selectByPage(@Param("offset") int offset,@Param("limit") Integer limit,@Param("studentSearchVO") StudentSearchVO studentSearchVO);

    long selectTotalCount(StudentSearchVO studentSearchVO);

    void add(Student student);

    Student selectById(Integer id);

    void update(Student student);
}
